RPG & SQL: Style and productivity: Guide to coding style, practices and productivity tools for the IBM i platform by Massimo Duca

RPG & SQL: Style and productivity: Guide to coding style, practices and productivity tools for the IBM i platform by Massimo Duca

Author:Massimo Duca [Duca, Massimo]
Language: eng
Format: azw3
Published: 2019-01-25T16:00:00+00:00


IBM offers a much more detailed guide on all types of XPath expressions:

https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzasp/rzasp_xpxqprologexpression.htm

Below is the instruction that analyzes the XML document loaded in the FILEXML file and shows its contents in tabular form:

SELECT w.*

FROM mduca1.filexml,

XMLTABLE ('$d/orders/order/line'

PASSING doc AS "d"

COLUMNS

cliente CHAR(8) PATH '../@customer',

dataOrdine CHAR(10) PATH '../@date',

articolo CHAR(20) PATH '@article',

um CHAR(20) PATH '@um' DEFAULT 'MT',

qty CHAR(11) PATH '@quantity' DEFAULT '0',

dataconsegna CHAR(10) PATH '@duedate'

) AS w

;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.